package com.zkthink.ceres.common.enums;

import com.zkthink.exception.BizException;
import lombok.Getter;

@Getter
public enum VipTypeEnum {
    PT_VIP(0, "普通会员"),
    TY_VIP(1, "体验VIP"),
    ZS_VIP(2, "钻石VIP"),
    YZ_VIP(3, "银钻VIP"),
    JZ_VIP(4, "金钻VIP");

    private int code;

    private String desc;

    VipTypeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static VipTypeEnum getDscByType(Integer type) {
        for (VipTypeEnum p : values()) {
            if (p.getCode() == type.intValue()) {
                return p;
            }
        }
        throw new BizException("no support promotionPlan");
    }
}
